from langchain_community.embeddings import DashScopeEmbeddings
embeddings = DashScopeEmbeddings(
    # model="multimodal-embedding-v1",
    model="text-embedding-v1",
    dashscope_api_key="sk-d16b46d66abb45bb960bd9c57804e2f9",
    # other params...
)

text = "你好，我是邢冬阳"

query_result = embeddings.embed_query(text)
print("文本向量长度：", len(query_result), sep='')

doc_results = embeddings.embed_documents(
    [
        "你好",
        "干嘛",
        "我是邢冬阳",
        "你在做什么？",
    ])
print("文本向量数量：", len(doc_results), "，文本向量长度：", len(doc_results[0]),doc_results, sep='')